package com.useeinfo.oa.common.config;

import com.useeinfo.framework.sugar.data.ExcelVO;
import com.useeinfo.framework.sugar.data.TitleVO;
import org.apache.commons.lang.StringUtils;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * Author: 居泽平  Date: 13-11-24, 下午11:20
 */
@SuppressWarnings("unused")
public class ExcelExportMap {

    public static Map<String, String> CUSTOMER_EXPORT_MAP(String selectFields) {

        Map<String, String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("account", "一米帐号");

        Map<String, String> columnPropertySelectMap = new LinkedHashMap<>();
        if (StringUtils.isNotEmpty(selectFields)) {
            String[] fields = selectFields.split(",");
            for (String field : fields) {
                columnPropertySelectMap.put(field, columnPropertyMap.get(field));
            }
        }

        return columnPropertySelectMap;
    }

    public static Map<String, String> APPLIANCES_IMPORT_MAP() {
        Map<String, String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("errormsg", "*错误信息");
        columnPropertyMap.put("applianceName", "*器具名称");
        columnPropertyMap.put("equipmentNumber", "设备编号");
        columnPropertyMap.put("equipmentName", "设备名称");
        columnPropertyMap.put("specificationModel", "*规格型号");
        columnPropertyMap.put("applianceCategory", "*器具类别");
        columnPropertyMap.put("applianceType", "*器具台账分类");
        columnPropertyMap.put("lawType", "*法制管理分类");
        columnPropertyMap.put("serialNumber", "*出厂编号");
        columnPropertyMap.put("dateOfManufacture", "出厂日期");
        columnPropertyMap.put("manufacturers", "*制造厂商");
        columnPropertyMap.put("useDepartment", "*使用部门");
        columnPropertyMap.put("custodian", "*保管人");
        columnPropertyMap.put("verificationType", "检定类型");
        columnPropertyMap.put("verifier", "检定员");
        columnPropertyMap.put("identificationCycle", "检定周期");
        columnPropertyMap.put("buyPrice", "购买价格");
        columnPropertyMap.put("groupedEquipment", "配套设备");
        columnPropertyMap.put("dateOfPurchase", "购买日期");
        columnPropertyMap.put("storageLocation", "存放地点");
        columnPropertyMap.put("dateOfActivation", "启用日期");
        columnPropertyMap.put("remark", "备注");
        columnPropertyMap.put("parameterName", "计量参数名称：");
        columnPropertyMap.put("technicalRange", "量程范围");
        columnPropertyMap.put("technicalAccuracy", "准确度/最大允差/不确定度");
        columnPropertyMap.put("traceabilityRange", "量程/校准点");
        columnPropertyMap.put("traceabilityAccuracy", "准确度/最大允差/不确定");
        return columnPropertyMap;
    }

    public static Map<String, String> APPLIANCES_EXPORT_MAP() {
        Map<String, String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("applianceName", "*器具名称");
        columnPropertyMap.put("equipmentNumber", "设备编号");
        columnPropertyMap.put("equipmentName", "设备名称");
        columnPropertyMap.put("specificationModel", "*规格型号");
        columnPropertyMap.put("applianceCategory", "*器具类别");
        columnPropertyMap.put("applianceType", "*器具台账分类");
        columnPropertyMap.put("lawType", "*法制管理分类");
        columnPropertyMap.put("serialNumber", "*出厂编号");
        columnPropertyMap.put("dateOfManufacture", "出厂日期");
        columnPropertyMap.put("manufacturers", "*制造厂商");
        columnPropertyMap.put("useDepartment", "*使用部门");
        columnPropertyMap.put("custodian", "*保管人");
        columnPropertyMap.put("verificationType", "检定类型");
        columnPropertyMap.put("verifier", "检定员");
        columnPropertyMap.put("identificationCycle", "检定周期");
        columnPropertyMap.put("buyPrice", "购买价格");
        columnPropertyMap.put("groupedEquipment", "配套设备");
        columnPropertyMap.put("dateOfPurchase", "购买日期");
        columnPropertyMap.put("storageLocation", "存放地点");
        columnPropertyMap.put("dateOfActivation", "启用日期");
        columnPropertyMap.put("remark", "备注");
        return columnPropertyMap;
    }


    public static List<ExcelVO> APPLIANCES_EXPORT_VO() {
        List<ExcelVO> excelVOS = new ArrayList<>();
        excelVOS.add(new ExcelVO("applianceName", "*器具名称", false));
        excelVOS.add(new ExcelVO("equipmentNumber", "设备编号", false));
        excelVOS.add(new ExcelVO("equipmentName", "设备名称", false));
        excelVOS.add(new ExcelVO("specificationModel", "*规格型号", false));
        excelVOS.add(new ExcelVO("applianceCategory", "*器具类别", false));
        excelVOS.add(new ExcelVO("applianceType", "*器具台账分类", false));
        excelVOS.add(new ExcelVO("lawType", "*法制管理分类", false));
        excelVOS.add(new ExcelVO("serialNumber", "*出厂编号", false));
        excelVOS.add(new ExcelVO("dateOfManufacture", "出厂日期", false));
        excelVOS.add(new ExcelVO("manufacturers", "*制造厂商", false));
        excelVOS.add(new ExcelVO("useDepartment", "*使用部门", false));
        excelVOS.add(new ExcelVO("custodian", "*保管人", false));
        excelVOS.add(new ExcelVO("verificationType", "检定类型", false));
        excelVOS.add(new ExcelVO("verifier", "检定员", false));
        excelVOS.add(new ExcelVO("identificationCycle", "检定周期", false));
        excelVOS.add(new ExcelVO("buyPrice", "购买价格", false));
        excelVOS.add(new ExcelVO("groupedEquipment", "配套设备", false));
        excelVOS.add(new ExcelVO("dateOfPurchase", "购买日期", false));
        excelVOS.add(new ExcelVO("storageLocation", "存放地点", false));
        excelVOS.add(new ExcelVO("dateOfActivation", "启用日期", false));
        excelVOS.add(new ExcelVO("remark", "备注", false));
        excelVOS.add(new ExcelVO("parameterName", "计量参数名称：", true));
        excelVOS.add(new ExcelVO("technicalRange", "量程范围", true));
        excelVOS.add(new ExcelVO("technicalAccuracy", "准确度/最大允差/不确定度", true));
        excelVOS.add(new ExcelVO("traceabilityRange", "量程/校准点", true));
        excelVOS.add(new ExcelVO("traceabilityAccuracy", "准确度/最大允差/不确定", true));
        return excelVOS;
    }


    public static Map<String, String> ACCOUNT_APPLIANCE_EXPORT_MAP() {
        Map<String, String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("applianceName", "*器具名称");
        columnPropertyMap.put("equipmentNumber", "设备编号");
        columnPropertyMap.put("equipmentName", "设备名称");
        columnPropertyMap.put("specificationModel", "*规格型号");
        columnPropertyMap.put("applianceCategory", "*器具类别");
        columnPropertyMap.put("serialNumber", "*出厂编号");
        columnPropertyMap.put("dateOfManufacture", "出厂日期");
        columnPropertyMap.put("manufacturers", "*制造厂商");
        columnPropertyMap.put("useDepartment", "*使用部门");
        columnPropertyMap.put("custodian", "*保管人");
        columnPropertyMap.put("verificationType", "检定类型");
        columnPropertyMap.put("verifier", "检定员");
        columnPropertyMap.put("identificationCycle", "检定周期");
        columnPropertyMap.put("buyPrice", "购买价格");
        columnPropertyMap.put("groupedEquipment", "配套设备");
        columnPropertyMap.put("dateOfPurchase", "购买日期");
        columnPropertyMap.put("storageLocation", "存放地点");
        columnPropertyMap.put("dateOfActivation", "启用日期");
        columnPropertyMap.put("remark", "备注");
        return columnPropertyMap;
    }

    public static Map<String, String> FACILITY_LIST_EXPORT_MAP() {
        Map<String, String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("name", "设备名称");
        columnPropertyMap.put("code", "设备编码");
        columnPropertyMap.put("factory", "生产厂商");
        columnPropertyMap.put("qrCode", "二维码值");
        columnPropertyMap.put("type", "规格型号");
        columnPropertyMap.put("rootCatName", "设备专业");
        columnPropertyMap.put("facilityCatName", "设备类型");
        columnPropertyMap.put("facilityGroupName", "设备分组");
        columnPropertyMap.put("areaName", "所属区域");
        columnPropertyMap.put("position", "位置");
        columnPropertyMap.put("precisePosition", "具体位置");
        columnPropertyMap.put("detailPosition", "详细位置");
        columnPropertyMap.put("longitude", "经度");
        columnPropertyMap.put("latitude", "纬度");
        columnPropertyMap.put("serialNum", "序列号");
        columnPropertyMap.put("guarantee", "保用期");
        columnPropertyMap.put("releaseDate", "出厂日期");
        columnPropertyMap.put("enableDate", "启用日期");
        columnPropertyMap.put("upPower", "上级电源");
        columnPropertyMap.put("sparePower", "备用电源");
        columnPropertyMap.put("belongSystem", "所属系统");
        columnPropertyMap.put("subSystem", "所属子系统");
        columnPropertyMap.put("importantDegree", "重要程度");
        columnPropertyMap.put("power", "功率");
        columnPropertyMap.put("gridPerson", "网格化负责人");
        columnPropertyMap.put("parentName", "所属主设备");
        columnPropertyMap.put("organizationName", "所属部门");
        columnPropertyMap.put("purpose", "功能用途");
        columnPropertyMap.put("mainParm", "主要技术参数");
        columnPropertyMap.put("costCenter", "成本中心");
        columnPropertyMap.put("faCode", "固定资产编号");
        columnPropertyMap.put("indoorText", "是否室内");
        columnPropertyMap.put("effectiveText", "是否有效");
        columnPropertyMap.put("createDate", "创建时间");
        columnPropertyMap.put("updateDate", "更新时间");
        return columnPropertyMap;
    }

    public static Map<String, String> MAINTAIN_ORDER_LIST_EXPORT_MAP() {
        Map<String, String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("orderName", "工单名称");
        columnPropertyMap.put("orderCode", "工单号");
        columnPropertyMap.put("orderType", "工单类型");
        columnPropertyMap.put("degree", "紧急程度");
        columnPropertyMap.put("orderStatus", "工单状态");
        columnPropertyMap.put("snapCount", "实施单数量");
        columnPropertyMap.put("organizationName", "所属部门");
        columnPropertyMap.put("assignType", "是否指派");
        columnPropertyMap.put("assignPositions", "指派岗位");
        columnPropertyMap.put("assignUsers", "指派人员");
        columnPropertyMap.put("createDate", "发布时间");
        columnPropertyMap.put("createUserName", "发布人");
        columnPropertyMap.put("startDateTime", "开始时间");
        columnPropertyMap.put("endDateTime", "结束时间");
        columnPropertyMap.put("receive", "是否接单");
        columnPropertyMap.put("receiveDate", "接单时间");
        columnPropertyMap.put("receiveUserName", "接单人");
        return columnPropertyMap;
    }

    public static Map<String, String> INSPECTION_ORDER_LIST_EXPORT_MAP() {
        Map<String, String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("orderName", "工单名称");
        columnPropertyMap.put("orderCode", "工单号");
        columnPropertyMap.put("orderType", "工单类型");
        columnPropertyMap.put("degree", "紧急程度");
        columnPropertyMap.put("orderStatus", "工单状态");
        columnPropertyMap.put("snapCount", "实施单数量");
        columnPropertyMap.put("organizationName", "所属部门");
        columnPropertyMap.put("assignType", "是否指派");
        columnPropertyMap.put("assignPositions", "指派岗位");
        columnPropertyMap.put("assignUsers", "指派人员");
        columnPropertyMap.put("createDate", "发布时间");
        columnPropertyMap.put("createUserName", "发布人");
        columnPropertyMap.put("startDateTime", "开始时间");
        columnPropertyMap.put("endDateTime", "结束时间");
        columnPropertyMap.put("receive", "是否接单");
        columnPropertyMap.put("receiveDate", "接单时间");
        columnPropertyMap.put("receiveUserName", "接单人");
        return columnPropertyMap;
    }

    public static Map<String,String> REPAIR_ORDER_LIST_EXPORT_MAP(){
        Map<String,String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("reportCode","报修编号");
        columnPropertyMap.put("telephoneUser","接线人");
        columnPropertyMap.put("createDate","报修时间");
        columnPropertyMap.put("repairOrderType","报修类型");
        columnPropertyMap.put("reportArea","报修区域");
        columnPropertyMap.put("reportAddress","报修地址");
        columnPropertyMap.put("reportContent","报修内容");
        columnPropertyMap.put("inRoutingScopeName","是否维修范围");
        columnPropertyMap.put("reportLevel","维修紧急程度");
        columnPropertyMap.put("repairType","维修工单类型");
        columnPropertyMap.put("customer","客户报修人");
        columnPropertyMap.put("callNumber","客户报修电话");
        columnPropertyMap.put("receiveUserName","接单人");
        columnPropertyMap.put("receiveDate","接单时间");
        columnPropertyMap.put("requirePresenceTime","要求到场时间");
        columnPropertyMap.put("presenceTime","实际到场时间");
        columnPropertyMap.put("responseTime","到场响应时间");
        columnPropertyMap.put("requireFinishTime","要求完成时间");
        columnPropertyMap.put("repairFinishTime","维修完成时间");
        columnPropertyMap.put("orderStatus","工单状态");
        columnPropertyMap.put("signDate","客户签字时间");
        columnPropertyMap.put("auditTime","审核时间");
        columnPropertyMap.put("lastRemark","评价");
        columnPropertyMap.put("lastScore","终审评分");
        columnPropertyMap.put("majorName","报修专业");
        columnPropertyMap.put("facilityName","报修设备");
        columnPropertyMap.put("troubleCat","故障名称");
        columnPropertyMap.put("faultReason","故障原因");
        columnPropertyMap.put("measure","采取措施");
        columnPropertyMap.put("spareParts","备品备件");
        columnPropertyMap.put("organizationName","报修部门名称");
        columnPropertyMap.put("enterpriseName","企业名称");
        return columnPropertyMap;
    }

    public static Map<String,String> TASK_ORDER_LIST_EXPORT_MAP(){
        Map<String,String> columnPropertyMap = new LinkedHashMap<>();
        columnPropertyMap.put("serial","任务流水号");
        columnPropertyMap.put("createUser","发布人");
        columnPropertyMap.put("createDate","发布时间");
        columnPropertyMap.put("taskSourceName","发布来源");
        columnPropertyMap.put("taskArea","任务区域");
        columnPropertyMap.put("taskAddress","任务地址");
        columnPropertyMap.put("taskContent","任务内容");
        columnPropertyMap.put("orderTypeName","任务工单类型");
        columnPropertyMap.put("receiveUser","接单人");
        columnPropertyMap.put("receiveTime","接单时间");
        columnPropertyMap.put("requirePresenceTime","要求到场时间");
        columnPropertyMap.put("presenceTime","实际到场时间");
        columnPropertyMap.put("requireFinishTime","要求完成时间");
        columnPropertyMap.put("taskFinishTime","完成时间");
        columnPropertyMap.put("orderStatusName","工单状态");
        columnPropertyMap.put("auditTime","审核时间");
        columnPropertyMap.put("lastRemark","评价");
        columnPropertyMap.put("lastScore","终审评分");
        columnPropertyMap.put("finishDescription","完成评价");
        columnPropertyMap.put("unFinishReason","未完成原因");
        columnPropertyMap.put("organizationName","任务部门");
        columnPropertyMap.put("enterpriseName","企业名称");
        return columnPropertyMap;
    }

    /**
     * 离心式冷水机组点检表
     *
     * @return
     */
    public static List<TitleVO> CENTRIFUGAL_CHILLER() {
        return new ArrayList<TitleVO>() {{
            add(new TitleVO(4, "微电脑控制中心的显示正常"));
            add(new TitleVO(5, "电机三相电流平衡"));
            add(new TitleVO(6, "电气控制、集控部件工作正常"));
            add(new TitleVO(7, "阀门状态与挂牌一致"));
            add(new TitleVO(8, "能源锁定图无缺失"));
            add(new TitleVO(9, "压力容器使用登记证无缺失"));
            add(new TitleVO(10, "保温完整无破损"));
            add(new TitleVO(11, "蒸发器冷媒液位观测镜显示正常"));
            add(new TitleVO(12, "油槽中的油位"));
            add(new TitleVO(13, "冷冻水进水水温"));
            add(new TitleVO(14, "冷冻水出水水温"));
            add(new TitleVO(15, "蒸发器压力"));
            add(new TitleVO(16, "冷却水进水水温"));
            add(new TitleVO(17, "冷却水出水水温"));
            add(new TitleVO(18, "冷凝器压力"));
            add(new TitleVO(19, "%满载安培"));
            add(new TitleVO(20, "冷凝器饱和温度"));
            add(new TitleVO(21, "蒸发器饱和温度"));
            add(new TitleVO(22, "排气温度"));
            add(new TitleVO(23, "油槽温度"));
            add(new TitleVO(24, "油压"));
            add(new TitleVO(25, "导流叶片开度"));
            add(new TitleVO(26, "压缩机出口压力"));
            add(new TitleVO(27, "制冷剂液位位置"));
        }};
    }

    /**
     * 螺杆式冷水机组点检表
     *
     * @return
     */
    public static List<TitleVO> SCREW_CHILLER() {
        return new ArrayList<TitleVO>() {{
            add(new TitleVO(4, "微电脑控制中心的显示正常"));
            add(new TitleVO(5, "电气控制、集控部件工作正常"));
            add(new TitleVO(6, "阀门状态与挂牌一致"));
            add(new TitleVO(7, "能源锁定图无缺失"));
            add(new TitleVO(8, "压力容器使用登记证无缺失"));
            add(new TitleVO(9, "保温完整无破损"));
            add(new TitleVO(10, "蒸发器冷媒液位观测镜显示正常"));
            add(new TitleVO(11, "油槽中的油位"));
            add(new TitleVO(12, "润滑油压差"));
            add(new TitleVO(13, "油过滤器压差"));
            add(new TitleVO(14, "冷冻水进水水温"));
            add(new TitleVO(15, "冷冻水出水水温"));
            add(new TitleVO(16, "蒸发器压力"));
            add(new TitleVO(17, "冷却水进水水温"));
            add(new TitleVO(18, "冷却水出水水温"));
            add(new TitleVO(19, "冷凝器压力"));
            add(new TitleVO(20, "排气温度"));
            add(new TitleVO(21, "冷凝器饱和温度"));
            add(new TitleVO(22, "蒸发器饱和温度"));
            add(new TitleVO(23, "%满载安培"));
            add(new TitleVO(24, "压缩机出口温度"));
            add(new TitleVO(25, "压缩机出口压力"));
        }};
    }

    /**
     * 离心式空压机组点检表
     *
     * @return
     */
    public static List<TitleVO> CENTRIFUGAL_AIR_COMPRESSOR() {
        return new ArrayList<TitleVO>() {{
            add(new TitleVO(4, "阀门状态与挂牌一致"));
            add(new TitleVO(5, "能源锁定图无缺失"));
            add(new TitleVO(6, "压力容器使用登记证无缺失"));
            add(new TitleVO(7, "冷却水进水压力"));
            add(new TitleVO(8, "冷却水进水温度"));
            add(new TitleVO(9, "冷却水出水温度"));
            add(new TitleVO(10, "空压机油位"));
            add(new TitleVO(11, "空气过滤器压差"));
            add(new TitleVO(12, "系统压力"));
            add(new TitleVO(13, "油压"));
            add(new TitleVO(14, "油温"));
            add(new TitleVO(15, "一级温度"));
            add(new TitleVO(16, "一级压力"));
            add(new TitleVO(17, "一级振动"));
            add(new TitleVO(18, "二级温度"));
            add(new TitleVO(19, "二级压力"));
            add(new TitleVO(20, "二级振动"));
            add(new TitleVO(21, "三级温度"));
            add(new TitleVO(22, "三级压力"));
            add(new TitleVO(23, "三级振动"));
            add(new TitleVO(24, "电流互感器输入"));
            add(new TitleVO(25, "自动排水动作"));
        }};
    }

    /**
     * 螺杆式空压机组点检表
     *
     * @return
     */
    public static List<TitleVO> SCREW_AIR_COMPRESSOR_UNIT() {
        return new ArrayList<TitleVO>() {{
            add(new TitleVO(4, "阀门状态与挂牌一致"));
            add(new TitleVO(5, "能源锁定图无缺失"));
            add(new TitleVO(6, "冷却水进水压力"));
            add(new TitleVO(7, "冷却水进水温度"));
            add(new TitleVO(8, "冷却水出水温度"));
            add(new TitleVO(9, "空压机油位"));
            add(new TitleVO(10, "自动排水动作"));
            add(new TitleVO(11, "气量百分比"));
            add(new TitleVO(12, "机主排气温度"));
            add(new TitleVO(13, "进气真空度"));
            add(new TitleVO(14, "油过滤器压差"));
            add(new TitleVO(15, "一级排气温度"));
            add(new TitleVO(16, "二级进气压力"));
            add(new TitleVO(17, "二级进气温度"));
            add(new TitleVO(18, "二级排气温度"));
            add(new TitleVO(19, "二级排气压力"));
            add(new TitleVO(20, "轴承润滑油压"));
            add(new TitleVO(21, "轴承润滑油温"));
            add(new TitleVO(22, "电机频率"));
            add(new TitleVO(23, "电机电流"));
            add(new TitleVO(24, "运行总小时"));
            add(new TitleVO(25, "变频器直电电压"));
        }};
    }
}
